package com.baidu.service.impl;

import com.baidu.dao.AssessMapper;
import com.baidu.pojo.Assess;
import com.baidu.pojo.Order;
import com.baidu.service.AssessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AssessServiceImpl implements AssessService {
    @Autowired
    private AssessMapper assessMapper;
    @Override
    public List<Assess> getAssessByEid(Integer eid) {
        return assessMapper.getAssessByEid(eid);
    }

    @Override
    public List<Assess> getAssessByUid(Integer uid) {
        return assessMapper.getAssessByUid(uid);
    }

    @Override
    public void updateAssessByAid(Assess assess) {
        assessMapper.updateAssessByAid(assess);
    }

    @Override
    public void delAssessByAid(Integer aid) {
        assessMapper.delAssessByAid(aid);
    }

    @Override
    public void addAssess(Assess assess) {
        assessMapper.addAssess(assess);
    }


    //查询所有用户评论
    public List<Assess> getAllAssesss(){
        return assessMapper.getAllAssesss();
    }

    //删除用户评论
    public void deleteAssess(Integer assess){
        assessMapper.deleteAssess(assess);
    }

    @Override
    public int count() {
        return assessMapper.count();
    }

    @Override
    public List<Assess> getByPage(Integer start, Integer pageSize) {
        return assessMapper.getByPage(start,pageSize);
    }

    @Override
    public Integer getAllAssessByUIdCount(Integer uid) {
        return assessMapper.getAllAssessByUIdCount(uid);
    }

    @Override
    public List<Assess> getAllAssessByUIdByPage(Integer start, Integer pageSize, Integer uid) {
        return assessMapper.getAllAssessByUIdByPage(start,pageSize,uid);
    }
}
